$(document).ready(function () {
    let width = $(window).width()
    let isMoble = width < 1200
    var swiper1 = new Swiper(".mySwiper", {
        slidesPerView: isMoble ? 1.6 : 3.6,
        centeredSlides: true,
        spaceBetween: 48,
        initialSlide: 3,
        centeredSlidesBounds: true,
        loop: true,
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
        },
        navigation: {
            nextEl: ".button-next",
            prevEl: ".button-prev",
        },
    });


    var swiper2 = new Swiper(".linkSwiper1", {
        autoplay: true,
        loop: true, // 循环模式选项
        loopPreventsSlide: true,//当swiper 正在过渡时，阻止slide 前进后退的切换操作
        observer: true,
        observeParents: true,
        spaceBetween: 140,
        slidesPerView: 4, //swiper容器同时展示的元素数量
        spaceBetween: 20, //元素之间间隔距离
        speed: 5000,  //slider自动滑动开始到结束的时间
        autoplay: {//开启自动切换
            delay: 1,//自动切换的时间间隔
            stopOnLastSlide: false,//当切换到最后一个slide时停止自动切换
            disableOnInteraction: false,//用户操作swiper之后，是否停止自动切换效果
        }
    });


    var swiper3 = new Swiper(".linkSwiper2", {
        autoplay: true,
        loop: true, // 循环模式选项
        loopPreventsSlide: true,//当swiper 正在过渡时，阻止slide 前进后退的切换操作
        observer: true,
        observeParents: true,
        spaceBetween: 120,
        slidesPerView: 3.5, //swiper容器同时展示的元素数量
        spaceBetween: 20, //元素之间间隔距离
        speed: 6000,  //slider自动滑动开始到结束的时间
        autoplay: {//开启自动切换
            delay: 1,//自动切换的时间间隔
            stopOnLastSlide: false,//当切换到最后一个slide时停止自动切换
            disableOnInteraction: false,//用户操作swiper之后，是否停止自动切换效果
        }
    });

    // $(function () {
    //     $('.linkSwiper1 .swiper-wrapper').liMarquee();
    // });

    // $(function () {
    //     $('.linkSwiper2').liMarquee();
    // });
})